package com.ssy.lingxi.product.controller;

import com.ssy.lingxi.common.controller.BaseController;
import com.ssy.lingxi.product.service.ITaskService;
import com.ssy.lingxi.scheduler.api.model.ScheduleTaskCallbackVO;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 定时任务管理类
 * @author jw.chen
 * @version 2.0.0
 * @date 2021/10/21
 */
@RestController
@RequestMapping("/product/task")
public class TaskController extends BaseController {

    @Resource
    private ITaskService taskService;

    /**
     * 统计分析商品价格
     */
    @RequestMapping(value = "/analyseCommodityPrice", method = RequestMethod.POST)
    public void analyseCommodityPrice(@RequestBody ScheduleTaskCallbackVO callbackVO) {
        taskService.analyseCommodityPrice();
    }
}
